Skip to content

fix(i18n): make zh pages render Chinese content + add zh install page#750

Merged
ZenoWang1999 merged 2 commits into
mainfrom
feat/zh-i18n-fixes
Jun 15, 2026
Merged

fix(i18n): make zh pages render Chinese content + add zh install page#750
ZenoWang1999 merged 2 commits into
mainfrom
feat/zh-i18n-fixes

Conversation

@ZenoWang1999

Copy link
Copy Markdown
Member
  • Remove force-static from [product]/[filename] route so getLocale() reads the x-language header at request time (force-static froze locale to build-time "en", causing /zh/pricing etc. to render English).
  • Add content/pages/YakShaver/zh/install.json (Chinese install page; previously fell back to English due to missing file).
  • Align zh navigation bar structure with the English version (add Install item, openInNewTab flags, CONTACT US + Portal buttons) keeping Chinese labels.
  • Include pre-existing zh/home.json content tweaks.
  • Fix the wording issue, see https://github.com/SSWConsulting/SSW.YakShaver/issues/3735

- Remove `force-static` from [product]/[filename] route so getLocale()
  reads the x-language header at request time (force-static froze locale
  to build-time "en", causing /zh/pricing etc. to render English).
- Add content/pages/YakShaver/zh/install.json (Chinese install page;
  previously fell back to English due to missing file).
- Align zh navigation bar structure with the English version (add Install
  item, openInNewTab flags, CONTACT US + Portal buttons) keeping Chinese labels.
- Include pre-existing zh/home.json content tweaks.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ssw-products Ready Ready Preview, Comment Jun 15, 2026 10:02am

Request Review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

https://github.com/SSWConsulting/SSW.Products/blob/fc9ba47d70c6f8acabf2085179ded7d92959c50c/app/[product]/[filename]/page.tsx#L19
P1 Badge Forward the locale before relying on getLocale

When a /zh/... URL or .cn host reaches this now-dynamic page, getLocale() still reads headers().get('x-language'), but middleware.ts:createRewriteResponse only sets x-language on the response via response.headers.set(...) and never forwards it in the rewritten request headers. In that scenario the page continues to fall back to en, so routes such as /zh/pricing and the new /zh/install still render English content despite removing force-static.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@yaqi-lyu yaqi-lyu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ZenoWang1999 ZenoWang1999 merged commit a10c077 into main Jun 15, 2026
2 checks passed
@ZenoWang1999 ZenoWang1999 deleted the feat/zh-i18n-fixes branch June 15, 2026 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants